QT       += core gui network xml concurrent

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

PkgName = com.github.ccc-webdav-client

CONFIG += c++11

isEmpty(VERSION) {
    VERSION = 0.0.1
}

# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS \
    QWEBDAV_LIBRARY \
    PkgName=\\\"$${PkgName}\\\" \
    PkgVersion=\\\"$${VERSION}\\\"

# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

INCLUDEPATH += $$PWD/include

SOURCES += \
    DirMonitor/DirMonitor.cpp \
    DirMonitor/DirMonitorForLinux.cpp \
    DirMonitor/DirMonitorForWin.cpp \
    ItemModifyDlg.cpp \
    Lib/qwebdavlib/qnaturalsort.cpp \
    Lib/qwebdavlib/qwebdav.cpp \
    Lib/qwebdavlib/qwebdavdirparser.cpp \
    Lib/qwebdavlib/qwebdavitem.cpp \
    MainWindow.cpp \
    Model.cpp \
    WorkerModel.cpp \
    main.cpp

HEADERS += \
    DirMonitor/DirMonitor.h \
    DirMonitor/DirMonitorForLinux.h \
    DirMonitor/DirMonitorForWin.h \
    ItemModifyDlg.h \
    Lib/qwebdavlib/qnaturalsort.h \
    Lib/qwebdavlib/qwebdav.h \
    Lib/qwebdavlib/qwebdav_global.h \
    Lib/qwebdavlib/qwebdavdirparser.h \
    Lib/qwebdavlib/qwebdavitem.h \
    MainWindow.h \
    Model.h \
    WorkerModel.h


unix {
    trayIcons.files += \
        Resources/Icons/WebdavClient.svg
    trayIcons.path = /usr/share/icons/hicolor/scalable/apps
    INSTALLS += trayIcons

    trayAniIcons.files += \
    Resources/Ani/WebdavClientSyncing1.png \
    Resources/Ani/WebdavClientSyncing2.png \
    Resources/Ani/WebdavClientSyncing3.png
    trayAniIcons.path = /usr/share/icons/hicolor/192x192/animations
    INSTALLS += trayAniIcons

    desktop.files += com.github.ccc-webdav-client.desktop
    desktop.path = /usr/share/applications
    INSTALLS += desktop
}

# Default rules for deployment.
qnx: target.path = /tmp/$${PkgName}/bin
else: unix:!android: target.path = /opt/apps/$${PkgName}/bin
!isEmpty(target.path): INSTALLS += target

win32 {
    LIBS += -L$$PWD/Lib/MinGW/ -llibcrypto
    LIBS += -L$$PWD/Lib/MinGW/ -llibssl
    LIBS += -lgdi32
}

 RC_ICONS = resources/Icons/WebdavClient.ico

RESOURCES += \
    Resources/Icons.qrc
